<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div></div>
    <script src="./js/axios.js"></script>
    <script>
        let box = document.querySelector('div')
        function getData1(){
            return  axios.get("./json/01.json").then(res =>{
                // console.log(res.data.matchedProducts);
             res.data.matchedProducts.forEach((item,index) =>{
                 var op = document.createElement("p")
                 op.innerText =`${item.collection_num} ${item.country}${item.pro_title}`
                   box.appendChild(op)
                })
                
            }).catch(err =>{
                console.log(err);
            })
            
        }
        function getData2(){
            return axios.get("./json/02.json").then(res =>{
             res.data.matchedProducts.forEach((item,index) =>{
                var op = document.createElement("p")
                op.innerText =`${item.collection_num} ${item.country}${item.pro_title}`
                   box.appendChild(op)
                   
                })
            })
            .catch(err =>{
                console.log(err);
            })
            
        }
        function getData3(){
            return  axios.get("./json/03.json").then(res =>{
             res.data.matchedProducts.forEach((item,index) =>{
                var op = document.createElement("p")
                op.innerText =`${item.collection_num} ${item.country}${item.pro_title}`
                   
                   box.appendChild(op)
                })
            })
            .catch(err =>{
                console.log(err);
            })
            
        }
        
        async function task(){
            console.log("start");
            await  getData1();
            await  getData2();
            await  getData3();
            console.log("end");
        }
        task();
       
    
        
    </script>
</body>
</html>